﻿<style type="text/css">
<!--
.caption td {
    border:1px solid #666666;
    font-weight:bold;
    background-color: #CCCCCC;
}
.dbtable {
    border:1px solid #666666;
}
.dbbody td {
    border:1px solid #666666;
}
-->
</style>
由<#=Environment.UserName#>/<#=Environment.MachineName#>生成于：<#=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")#> <BR />
<#
foreach(IDataTable table in Tables){
#>
<#=table.Name#>：
<strong><#=table.DisplayName#> （<#=table.TableName#>）<#if(!String.IsNullOrEmpty(table.BaseType)){#>=> <#=table.BaseType#><#}#></strong> <BR>
<table border="0" cellspacing="0" class="dbtable">
  <tr align="center" valign="middle" class="caption">
    <td width="150">中文名</td>
    <td width="150">英文名</td>
    <td width="150">字段名</td>
    <td width="75">数据类型</td>
    <td width="50">大小</td>
    <td width="35">主键</td>
    <td width="35">唯一</td>
    <td width="35">必填</td>
    <td width="150">描述</td>
  </tr><#
  foreach(IDataColumn Field in table.GetAllColumns(Tables, true))
  {
  #>
  <tr class="dbbody">
    <td><#=Field.DisplayName+" "#></td>
    <td><#=Field.Name#></td>
    <td><#=Field.ColumnName#></td>
    <td><#=Field.DataType!=null?Field.DataType.Name:" "#></td>
    <td><#=Field.Length#></td>
    <td align="center"><#=Field.PrimaryKey?"是":"&nbsp;"#></td>
    <td align="center"><#=Field.Identity?"是":(Field.PrimaryKey?"是":"&nbsp;")#></td>
    <td align="center"><#=Field.Nullable?"&nbsp;":"是"#></td>
    <td><#=StringHelper.TrimStart(Field.Description, Field.DisplayName, ".", "。")+" "#></td>
  </tr><#}#>
</table>
<#}#>